package com.bruce.starts.demo.commonerror.transaction;

import java.util.concurrent.atomic.AtomicReference;

public class ExceptionTest {
    public static void main(String[] args) {
        AtomicReference<Boolean> flag = new AtomicReference<>(false);
        change(flag);
        System.out.println(flag.get());
        try {
            throw new Exception("测试");
        }catch (Exception e){
            System.out.println("e"+e.getMessage());
        }
    }
    private static void change(AtomicReference<Boolean> flag){
        flag.set(true);
    }
}
